home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / misc / edu / globe099src.lha / Ami-Globe / win_info_pays.h < prev    next >
C/C++ Source or Header  |  1994-04-30  |  11KB  |  348 lines

  1.  
  2. UBYTE infpinfpnaSIBuff[20];
  3. struct StringInfo infpinfpnaSInfo = {
  4.     infpinfpnaSIBuff,    /* buffer where text will be edited */
  5.     NULL,    /* optional undo buffer */
  6.     0,    /* character position in buffer */
  7.     20,    /* maximum number of characters to allow */
  8.     0,    /* first displayed character buffer position */
  9.     0,0,0,0,0,    /* Intuition initialized and maintained variables */
  10.     0,    /* Rastport of gadget */
  11.     0,    /* initial value for integer gadgets */
  12.     NULL    /* alternate keymap (fill in if you set the flag) */
  13. };
  14.  
  15. SHORT infpBorderVectors1[] = {
  16.     0,0,
  17.     132,0,
  18.     132,9,
  19.     0,9,
  20.     0,0
  21. };
  22. struct Border infpBorder1 = {
  23.     -1,-1,    /* XY origin relative to container TopLeft */
  24.     3,0,JAM1,    /* front pen, back pen and drawmode */
  25.     5,    /* number of XY vectors */
  26.     infpBorderVectors1,    /* pointer to XY vectors */
  27.     NULL    /* next border in list */
  28. };
  29.  
  30. struct IntuiText infpIText1 = {
  31.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  32.     -44,0,    /* XY origin relative to container TopLeft */
  33.     NULL,    /* font pointer or NULL for default */
  34.     "Name:",    /* pointer to text */
  35.     NULL    /* next IntuiText structure */
  36. };
  37.  
  38. struct Gadget infpna = {
  39.     NULL,    /* next gadget */
  40.     81,18,    /* origin XY of hit box relative to window TopLeft */
  41.     131,8,    /* hit box width and height */
  42.     NULL,    /* gadget flags */
  43.     RELVERIFY,    /* activation flags */
  44.     STRGADGET,    /* gadget type flags */
  45.     (APTR)&infpBorder1,    /* gadget border or image to be rendered */
  46.     NULL,    /* alternate imagery for selection */
  47.     &infpIText1,    /* first IntuiText structure */
  48.     NULL,    /* gadget mutual-exclude long word */
  49.     (APTR)&infpinfpnaSInfo,    /* SpecialInfo structure */
  50.     NULL,    /* user-definable data */
  51.     NULL    /* pointer to user-definable data */
  52. };
  53.  
  54. SHORT infpBorderVectors2[] = {
  55.     0,0,
  56.     55,0,
  57.     55,16,
  58.     0,16,
  59.     0,0
  60. };
  61. struct Border infpBorder2 = {
  62.     -1,-1,    /* XY origin relative to container TopLeft */
  63.     3,0,JAM1,    /* front pen, back pen and drawmode */
  64.     5,    /* number of XY vectors */
  65.     infpBorderVectors2,    /* pointer to XY vectors */
  66.     NULL    /* next border in list */
  67. };
  68.  
  69. struct IntuiText infpIText2 = {
  70.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  71.     10,3,    /* XY origin relative to container TopLeft */
  72.     NULL,    /* font pointer or NULL for default */
  73.     "Add",    /* pointer to text */
  74.     NULL    /* next IntuiText structure */
  75. };
  76.  
  77. struct Gadget infps3 = {
  78.     &infpna,    /* next gadget */
  79.     167,84,    /* origin XY of hit box relative to window TopLeft */
  80.     54,15,    /* hit box width and height */
  81.     NULL,    /* gadget flags */
  82.     RELVERIFY,    /* activation flags */
  83.     BOOLGADGET,    /* gadget type flags */
  84.     (APTR)&infpBorder2,    /* gadget border or image to be rendered */
  85.     NULL,    /* alternate imagery for selection */
  86.     &infpIText2,    /* first IntuiText structure */
  87.     NULL,    /* gadget mutual-exclude long word */
  88.     NULL,    /* SpecialInfo structure */
  89.     NULL,    /* user-definable data */
  90.     NULL    /* pointer to user-definable data */
  91. };
  92.  
  93. SHORT infpBorderVectors3[] = {
  94.     0,0,
  95.     55,0,
  96.     55,16,
  97.     0,16,
  98.     0,0
  99. };
  100. struct Border infpBorder3 = {
  101.     -1,-1,    /* XY origin relative to container TopLeft */
  102.     3,0,JAM1,    /* front pen, back pen and drawmode */
  103.     5,    /* number of XY vectors */
  104.     infpBorderVectors3,    /* pointer to XY vectors */
  105.     NULL    /* next border in list */
  106. };
  107.  
  108. struct IntuiText infpIText3 = {
  109.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  110.     11,3,    /* XY origin relative to container TopLeft */
  111.     NULL,    /* font pointer or NULL for default */
  112.     "Del",    /* pointer to text */
  113.     NULL    /* next IntuiText structure */
  114. };
  115.  
  116. struct Gadget infps2 = {
  117.     &infps3,    /* next gadget */
  118.     167,66,    /* origin XY of hit box relative to window TopLeft */
  119.     54,15,    /* hit box width and height */
  120.     NULL,    /* gadget flags */
  121.     RELVERIFY,    /* activation flags */
  122.     BOOLGADGET,    /* gadget type flags */
  123.     (APTR)&infpBorder3,    /* gadget border or image to be rendered */
  124.     NULL,    /* alternate imagery for selection */
  125.     &infpIText3,    /* first IntuiText structure */
  126.     NULL,    /* gadget mutual-exclude long word */
  127.     NULL,    /* SpecialInfo structure */
  128.     NULL,    /* user-definable data */
  129.     NULL    /* pointer to user-definable data */
  130. };
  131.  
  132. SHORT infpBorderVectors4[] = {
  133.     0,0,
  134.     55,0,
  135.     55,16,
  136.     0,16,
  137.     0,0
  138. };
  139. struct Border infpBorder4 = {
  140.     -1,-1,    /* XY origin relative to container TopLeft */
  141.     3,0,JAM1,    /* front pen, back pen and drawmode */
  142.     5,    /* number of XY vectors */
  143.     infpBorderVectors4,    /* pointer to XY vectors */
  144.     NULL    /* next border in list */
  145. };
  146.  
  147. struct IntuiText infpIText4 = {
  148.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  149.     6,3,    /* XY origin relative to container TopLeft */
  150.     NULL,    /* font pointer or NULL for default */
  151.     "Show",    /* pointer to text */
  152.     NULL    /* next IntuiText structure */
  153. };
  154.  
  155. struct Gadget infps1 = {
  156.     &infps2,    /* next gadget */
  157.     167,48,    /* origin XY of hit box relative to window TopLeft */
  158.     54,15,    /* hit box width and height */
  159.     NULL,    /* gadget flags */
  160.     RELVERIFY,    /* activation flags */
  161.     BOOLGADGET,    /* gadget type flags */
  162.     (APTR)&infpBorder4,    /* gadget border or image to be rendered */
  163.     NULL,    /* alternate imagery for selection */
  164.     &infpIText4,    /* first IntuiText structure */
  165.     NULL,    /* gadget mutual-exclude long word */
  166.     NULL,    /* SpecialInfo structure */
  167.     NULL,    /* user-definable data */
  168.     NULL    /* pointer to user-definable data */
  169. };
  170.  
  171. UBYTE infpinfpbord_numSIBuff[4];
  172. struct StringInfo infpinfpbord_numSInfo = {
  173.     infpinfpbord_numSIBuff,    /* buffer where text will be edited */
  174.     NULL,    /* optional undo buffer */
  175.     0,    /* character position in buffer */
  176.     4,    /* maximum number of characters to allow */
  177.     0,    /* first displayed character buffer position */
  178.     0,0,0,0,0,    /* Intuition initialized and maintained variables */
  179.     0,    /* Rastport of gadget */
  180.     0,    /* initial value for integer gadgets */
  181.     NULL    /* alternate keymap (fill in if you set the flag) */
  182. };
  183.  
  184. SHORT infpBorderVectors5[] = {
  185.     0,0,
  186.     68,0,
  187.     68,9,
  188.     0,9,
  189.     0,0
  190. };
  191. struct Border infpBorder5 = {
  192.     -1,-1,    /* XY origin relative to container TopLeft */
  193.     3,0,JAM1,    /* front pen, back pen and drawmode */
  194.     5,    /* number of XY vectors */
  195.     infpBorderVectors5,    /* pointer to XY vectors */
  196.     NULL    /* next border in list */
  197. };
  198.  
  199. struct Gadget infpbord_num = {
  200.     &infps1,    /* next gadget */
  201.     158,36,    /* origin XY of hit box relative to window TopLeft */
  202.     67,8,    /* hit box width and height */
  203.     NULL,    /* gadget flags */
  204.     RELVERIFY,    /* activation flags */
  205.     STRGADGET,    /* gadget type flags */
  206.     (APTR)&infpBorder5,    /* gadget border or image to be rendered */
  207.     NULL,    /* alternate imagery for selection */
  208.     NULL,    /* first IntuiText structure */
  209.     NULL,    /* gadget mutual-exclude long word */
  210.     (APTR)&infpinfpbord_numSInfo,    /* SpecialInfo structure */
  211.     NULL,    /* user-definable data */
  212.     NULL    /* pointer to user-definable data */
  213. };
  214.  
  215. SHORT infpBorderVectors6[] = {
  216.     0,0,
  217.     33,0,
  218.     33,12,
  219.     0,12,
  220.     0,0
  221. };
  222. struct Border infpBorder6 = {
  223.     -1,-1,    /* XY origin relative to container TopLeft */
  224.     3,0,JAM1,    /* front pen, back pen and drawmode */
  225.     5,    /* number of XY vectors */
  226.     infpBorderVectors6,    /* pointer to XY vectors */
  227.     NULL    /* next border in list */
  228. };
  229.  
  230. struct Gadget infpd2 = {
  231.     &infpbord_num,    /* next gadget */
  232.     128,77,    /* origin XY of hit box relative to window TopLeft */
  233.     32,11,    /* hit box width and height */
  234.     NULL,    /* gadget flags */
  235.     RELVERIFY,    /* activation flags */
  236.     BOOLGADGET,    /* gadget type flags */
  237.     (APTR)&infpBorder6,    /* gadget border or image to be rendered */
  238.     NULL,    /* alternate imagery for selection */
  239.     NULL,    /* first IntuiText structure */
  240.     NULL,    /* gadget mutual-exclude long word */
  241.     NULL,    /* SpecialInfo structure */
  242.     NULL,    /* user-definable data */
  243.     NULL    /* pointer to user-definable data */
  244. };
  245.  
  246. SHORT infpBorderVectors7[] = {
  247.     0,0,
  248.     33,0,
  249.     33,12,
  250.     0,12,
  251.     0,0
  252. };
  253. struct Border infpBorder7 = {
  254.     -1,-1,    /* XY origin relative to container TopLeft */
  255.     3,0,JAM1,    /* front pen, back pen and drawmode */
  256.     5,    /* number of XY vectors */
  257.     infpBorderVectors7,    /* pointer to XY vectors */
  258.     NULL    /* next border in list */
  259. };
  260.  
  261. struct Gadget infpu1 = {
  262.     &infpd2,    /* next gadget */
  263.     129,48,    /* origin XY of hit box relative to window TopLeft */
  264.     32,11,    /* hit box width and height */
  265.     NULL,    /* gadget flags */
  266.     RELVERIFY,    /* activation flags */
  267.     BOOLGADGET,    /* gadget type flags */
  268.     (APTR)&infpBorder7,    /* gadget border or image to be rendered */
  269.     NULL,    /* alternate imagery for selection */
  270.     NULL,    /* first IntuiText structure */
  271.     NULL,    /* gadget mutual-exclude long word */
  272.     NULL,    /* SpecialInfo structure */
  273.     NULL,    /* user-definable data */
  274.     NULL    /* pointer to user-definable data */
  275. };
  276.  
  277. SHORT infpBorderVectors8[] = {
  278.     0,0,
  279.     77,0,
  280.     77,16,
  281.     0,16,
  282.     0,0
  283. };
  284. struct Border infpBorder8 = {
  285.     -1,-1,    /* XY origin relative to container TopLeft */
  286.     3,0,JAM1,    /* front pen, back pen and drawmode */
  287.     5,    /* number of XY vectors */
  288.     infpBorderVectors8,    /* pointer to XY vectors */
  289.     NULL    /* next border in list */
  290. };
  291.  
  292. struct IntuiText infpIText5 = {
  293.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  294.     20,4,    /* XY origin relative to container TopLeft */
  295.     NULL,    /* font pointer or NULL for default */
  296.     "Quit",    /* pointer to text */
  297.     NULL    /* next IntuiText structure */
  298. };
  299.  
  300. struct Gadget infpok1 = {
  301.     &infpu1,    /* next gadget */
  302.     102,108,    /* origin XY of hit box relative to window TopLeft */
  303.     76,15,    /* hit box width and height */
  304.     NULL,    /* gadget flags */
  305.     RELVERIFY,    /* activation flags */
  306.     BOOLGADGET,    /* gadget type flags */
  307.     (APTR)&infpBorder8,    /* gadget border or image to be rendered */
  308.     NULL,    /* alternate imagery for selection */
  309.     &infpIText5,    /* first IntuiText structure */
  310.     NULL,    /* gadget mutual-exclude long word */
  311.     NULL,    /* SpecialInfo structure */
  312.     NULL,    /* user-definable data */
  313.     NULL    /* pointer to user-definable data */
  314. };
  315.  
  316. #define infpGadgetList1 infpok1
  317.  
  318. struct NewWindow infpNewWindowStructure1 = {
  319.     12,33,    /* window XY origin relative to TopLeft of screen */
  320.     258,128,    /* window width and height */
  321.     0,1,    /* detail and block pens */
  322.     GADGETDOWN+GADGETUP+CLOSEWINDOW,    /* IDCMP flags */
  323.     WINDOWSIZING+WINDOWDRAG+WINDOWDEPTH+WINDOWCLOSE+ACTIVATE+NOCAREREFRESH,    /* other window flags */
  324.     &infpok1,    /* first gadget in gadget list */
  325.     NULL,    /* custom CHECKMARK imagery */
  326.     "Info pays",    /* window title */
  327.     NULL,    /* custom screen pointer */
  328.     NULL,    /* custom bitmap */
  329.     5,5,    /* minimum width and height */
  330.     65535,65535,    /* maximum width and height */
  331.     CUSTOMSCREEN    /* destination screen type */
  332. };
  333.  
  334.  
  335. void HandleEvent3(APTR object)
  336. {
  337.   if (object == (APTR)&infpok1) { cmd_ok(); return; }
  338.   if (object == (APTR)&infpu1) { cmd_up(); return; }
  339.   if (object == (APTR)&infpd2) { cmd_down(); return; }
  340.   if (object == (APTR)&infps1) { cmd_show_bord(); return; }
  341.   if (object == (APTR)&infps2) { cmd_del_bord(); return; }
  342.   if (object == (APTR)&infps3) { cmd_add_bord(); return; }
  343.   if (object == (APTR)&infpna) { cmd_newname(); return; }
  344. }
  345. #define HANDLEEVENT HandleEvent
  346.  
  347. /* end of PowerWindows source generation */
  348.